package cn.webrx;

import java.util.Calendar;

public class If1 {
    public static void main(String[] args) {
        //日历类实例化
        var c = Calendar.getInstance();
        //获取日历实例对象的星期几1-7
        var k = c.get(Calendar.DAY_OF_WEEK);
        //k = 6

        if (k == 1) {
            System.out.println("星期日");
        } else if (k == 2) {
            System.out.println("星期一");
        } else if (k == 3) {
            System.out.println("星期二");
        } else if (k == 4) {
            System.out.println("星期三");
        } else if (k == 5) {
            System.out.println("星期四");
        } else if (k == 6) {
            System.out.println("星期五");
        } else {
            System.out.println("星期六");
        }


        System.exit(0);
        System.out.printf("%tA%n", c);

        int a = 3, b = 13;
        //if (a >= b) {
        //    System.out.printf("%d=%d", a, b);
        //}

        if (a >= b) {
            //（）内逻辑表达式值为true 要执行此行代码 真
            System.out.printf("%d=%d", a, b);
        } else {
            //false 假
            System.out.printf("%d不大于%d%n", a, b);
        }


    }
}
